package com.zh.sharding.sale.entity;

import com.zh.mycommon.util.MyDateUtil;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 操作记录表
 * 分片规则：按时间分片
 * @author zhou
 * @date 2023/8/23
 */
@Data
public class OperateLogRecord implements Serializable {
    /**
     * ID自增
     */
    private Long id;
    private String content;
    private String user;
    private LocalDateTime createTime;

    private OperateLogRecord(){
    }
    public OperateLogRecord(String content){
        this.content = content;
        this.user = "";
        this.createTime = LocalDateTime.now();
    }

//    public String getCreateTime() {
//        if (this.createTime==null){
//            return "";
//        }
//        return  MyDateUtil.formatDate("yyyy-MM-dd HH:mm:ss", this.createTime);
//    }
}
